﻿using System.Windows;
using Socium.Presentation;

namespace Socium {
	class EnvironmentService {
		readonly IFormViewService _form_view_service;
		readonly IPageViewService _page_view_service;

		public EnvironmentService(IFormViewService form_view_service, IPageViewService page_view_service) {
			_form_view_service = form_view_service;
			_page_view_service = page_view_service;
		}

		public void ShowPage(PageViewModel view_model) {
			_page_view_service.Show(view_model);
		}

		public void ShowForm(IFormViewModel view_model) {
			_form_view_service.Show(view_model);
		}

		public bool Confirm(string message) {
			var result = MessageBox.Show(message, "Socium", MessageBoxButton.YesNo);
			return result == MessageBoxResult.Yes;
		}
	}
}
